CREATE TABLE [dbo].[tb_AltasTransferencia]
(
[idAltaTransferencia] [int] NOT NULL IDENTITY(1, 1),
[Transferencia] [int] NOT NULL,
[PlazaActual] [int] NULL,
[PlazaFutura] [int] NULL,
[Estado] [int] NOT NULL,
[TipoAlta] [int] NOT NULL,
[ServicioOperativo] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_AltasTransferencia] ADD CONSTRAINT [PK_tb_AltasTransferencia] PRIMARY KEY NONCLUSTERED  ([idAltaTransferencia]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_AltasTransferencia] ADD CONSTRAINT [FK_tb_AltasTransferencia_tb_EstadosDeReestructura] FOREIGN KEY ([Estado]) REFERENCES [dbo].[tb_EstadosDeReestructura] ([idEstadoReestructura])
GO
ALTER TABLE [dbo].[tb_AltasTransferencia] WITH NOCHECK ADD CONSTRAINT [FK_tb_AltasTransferencia_tb_Plazas] FOREIGN KEY ([PlazaActual]) REFERENCES [dbo].[tb_Plazas] ([idPlaza])
GO
ALTER TABLE [dbo].[tb_AltasTransferencia] WITH NOCHECK ADD CONSTRAINT [FK_tb_AltasTransferencia_tb_AperturasDeReestructura] FOREIGN KEY ([PlazaFutura]) REFERENCES [dbo].[tb_AperturasDeReestructura] ([idAperturaReestructura])
GO
ALTER TABLE [dbo].[tb_AltasTransferencia] WITH NOCHECK ADD CONSTRAINT [FK_tb_AltasTransferencia_tb_TiposAltaDeServicios] FOREIGN KEY ([TipoAlta]) REFERENCES [dbo].[tb_TiposAltaDeServicios] ([idTipoAltaServicio])
GO
ALTER TABLE [dbo].[tb_AltasTransferencia] WITH NOCHECK ADD CONSTRAINT [FK_tb_AltasTransferencia_tb_TranseferenciasDeReestructura] FOREIGN KEY ([Transferencia]) REFERENCES [dbo].[tb_TransferenciasDeReestructura] ([idTransferencia])
GO
ALTER TABLE [dbo].[tb_AltasTransferencia] NOCHECK CONSTRAINT [FK_tb_AltasTransferencia_tb_Plazas]
GO
ALTER TABLE [dbo].[tb_AltasTransferencia] NOCHECK CONSTRAINT [FK_tb_AltasTransferencia_tb_AperturasDeReestructura]
GO
ALTER TABLE [dbo].[tb_AltasTransferencia] NOCHECK CONSTRAINT [FK_tb_AltasTransferencia_tb_TiposAltaDeServicios]
GO
ALTER TABLE [dbo].[tb_AltasTransferencia] NOCHECK CONSTRAINT [FK_tb_AltasTransferencia_tb_TranseferenciasDeReestructura]
GO
